﻿namespace LJ.Abstractions.Config;

/// <summary>
/// Config管理器
/// </summary>
public interface IConfigManager
{
    /// <summary>
    /// 添加Config
    /// </summary>
    /// <typeparam name="TConfig"></typeparam>
    /// <param name="key"></param>
    /// <param name="path"></param>
    void Add<TConfig>(string key, string path) where TConfig : class;

    /// <summary>
    /// 添加Config
    /// </summary>
    /// <typeparam name="TConfig"></typeparam>
    /// <param name="path"></param>
    void Add<TConfig>(string path) where TConfig : class;

    /// <summary>
    /// 绑定Config
    /// </summary>
    /// <param name="key"></param>
    /// <param name="instance"></param>
    void Bind(string key, object instance);
}